package com.supreme.studyserver.threadstore;

import com.supreme.studyserver.entity.Teacher;

public class ThreadState {

    public static ThreadLocal<Teacher> threadLocal = new ThreadLocal<>();

    public static void threadLocalInit() {
        threadLocal.set(new Teacher());
    }

    public static void setThreadLocal(ThreadLocal<Teacher> threadLocal) {
        ThreadState.threadLocal = threadLocal;
    }

    public static ThreadLocal<Teacher> getThreadLocal() {
        return threadLocal;
    }
}
